$(function() {
    var a = getCookie("key");
    var e = '';

    e +='<div id="bottom">'
        +'<div style=" height:60px;">'
  +'<div id="nav-tab" style="bottom:-60px;">'
            +'<div class="clearfix tab-line nav">'
      +'<div class="tab-line-item" style="width:20%;" ><a href="'+WapSiteUrl+'"><i class="fa fa-home"></i><br>首页</a></div>'
      +'<div class="tab-line-item" style="width:20%;" ><a href="'+WapSiteUrl+'/tmpl/product_first_categroy.php"><i class="fa fa-th-list"></i><br>分类</a></div>'
      +'<div class="tab-line-item" style="width:20%;" ><a href="/wap/tmpl/search.php"><i class="fa fa-search"></i><br>搜索</a></div>'
      +'<div class="tab-line-item" style="width:20%;position: relative;" ><a href="'+WapSiteUrl+'/tmpl/cart_list.html"><i class="fa fa-shopping-cart"></i><br>购物车</a></div>'
      +'<div class="tab-line-item" style="width:20%;position: relative;" ><a href="'+WapSiteUrl+'/tmpl/member/member.php"><i class="fa fa-user"></i><br>个人中心</a></div>'
    +'</div>'
   +'</div>'
+'</div>';
    // if (a) {
    //     e += '<a href="' + WapSiteUrl + '/tmpl/member/member.html">我的商城</a>' + '<a id="logoutbtn" href="javascript:void(0);">注销</a>' + '<a href="' + WapSiteUrl + '/tmpl/member/member_feedback.html">反馈</a>'
    // } else {
    //     e += '<a href="' + WapSiteUrl + '/tmpl/member/login.html">登录</a>' + '<a href="' + WapSiteUrl + '/tmpl/member/register.html">注册</a>' + '<a href="' + WapSiteUrl + '/tmpl/member/login.html">反馈</a>'
    // }
    // e += '<a href="javascript:void(0);" class="gotop">返回顶部</a>' + "</div>" + '<div class="nav-pic">' + '<a href="' + SiteUrl + '/index.php?act=mb_app" class="app"><span><i></i></span><p>客户端</p></a>' + '<a href="javascript:void(0);" class="touch"><span><i></i></span><p>触屏版</p></a>' + '<a href="' + SiteUrl + '" class="pc"><span><i></i></span><p>电脑版</p></a>' + "</div>" + '<div class="copyright">' + 'Copyright&nbsp;&copy;&nbsp;2005-2016 <a href="javascript:void(0);">好商城V4 www.haoid.cn</a>版权所有' + "</div>";
    $("#footer").html(e);
    var a = getCookie("key");
    $("#logoutbtn").click(function() {
        var a = getCookie("username");
        var e = getCookie("key");
        var i = "wap";
        $.ajax({
            type: "get",
            url: ApiUrl + "/index.php?act=logout",
            data: {
                username: a,
                key: e,
                client: i
            },
            success: function(a) {
                if (a) {
                    delCookie("username");
                    delCookie("key");
                    location.href = WapSiteUrl+'/tmpl/member/login.php';
                }
            }
        })
    })
});